package com.spring.config;

/**
 * 模拟spring对bean对象前置增强和后置增强
 */
public interface BeanPostProcessor {

    /**
     * bean对象完成初始化之前的前置增强
     * @param bean
     * @param beanName
     * @return
     */
    default Object postProcessBeforeInitialization(Object bean, String beanName) {
        return bean;
    }

    /**
     * bean对象初始化完成后后置增强
     * @param bean
     * @param beanName
     * @return
     */
    default Object postProcessAfterInitialization(Object bean, String beanName){
        return bean;
    }
}
